package com.yhsoft.sys.controller.Response;

import com.yhsoft.sys.entity.CompanyInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: yyyyyyyh
 * @create: 2023-09-24
 * @Version 1.0
 **/
@Data
public class DistributorListOutVo {
    /**
     * id
     */
    @ApiModelProperty("企业id")
    private Integer id;

    /**
     * 企业名称
     */
    @ApiModelProperty("企业名称")
    private String companyName;

    /**
     * 状态
     */
    @ApiModelProperty("状态：1-可用，0-不可用")
    private Integer companyStatus;

    /**
     * 联系人
     */
    @ApiModelProperty("联系人")
    private String contacts;

    /**
     * 联系人电话
     */
    @ApiModelProperty("联系人电话")
    private String contactsPhone;

    /**
     * 小程序二维码
     */
    @ApiModelProperty("小程序二维码")
    private String wxAppQrCode;

    public static DistributorListOutVo valueOf(CompanyInfo companyInfo){
        DistributorListOutVo distributorListOutVo = new DistributorListOutVo();
        distributorListOutVo.setId(companyInfo.getId());
        distributorListOutVo.setCompanyName(companyInfo.getCompanyName());
        distributorListOutVo.setCompanyStatus(companyInfo.getCompanyStatus());
        distributorListOutVo.setContacts(companyInfo.getContacts());
        distributorListOutVo.setContactsPhone(companyInfo.getContactsPhone());
        distributorListOutVo.setWxAppQrCode(companyInfo.getWxAppQrCode());
        return distributorListOutVo;
    }
}
